Random Hacktivity Summary

Shlomi Fish on 2008-08-12T20:28:29

This is another boring hacktivity summary, but this time mostly Perl-related - so I'm posting it here.

First order of business is Games-Solitaire-Verify. In its first versions I implemented textual return values for the verify_and_perform_move() method. However, this makes it harder and more error-prone to programmatically understand why exactly the verifier does not like your move . True to my ideals that errors that need to be caught and processed must be objects, I converted everything to return Exception::Class-subclasses. E::C really made my job easy and now my main gripe with everything is that my error class names have become unweildy. Some examples are:

  • Games::Solitaire::Verify::Exception::Move::Src::Col::NotEnoughCards
  • Games::Solitaire::Verify::Exception::Move::Src::Col::NonSequence
  • Games::Solitaire::Verify::Exception::Move::Dest::Col::OnlyKingsCanFillEmpty

Oh well. In any case, now that I've converted everthing to classes, I forgot to add stringified versions of the errors (which Exception::Class supports), so if something breaks and is reported to the shell, it may not be very human-friendly. I guess it means a bit more work there.

Afterwards, I decided to work a bit on Test-Run, and after I read its todo list, remembered that I still intended to create some specialised Module-Starter plugins for it. Then I remembered that I asked about M-S' test suite, and found out it didn't have a comperensive one. So, I decided to remedy this and wrote a patch to add a test script. For the test script I parsed the generated files step-by-step using a class and some test assertion methods.

Since I had no repository access, the first versions of the patch were written by repeatedly running svn diff into files, but I decided I want a more robust version control for the local host. So I looked into svk but it had acquired a bug on my system.. Then I decided to try bzr-svn, but it had a non-starter bug. Now since I dislike git quite a bit, I searched for something Mercurial-based and found hgsvn. This worked surprisingly well for my purposes and I was able to version the local copy. Mercurial seems pretty nifty so far.

The Module-Starter patch was not integrated into the repository yet. Module-Starter has been suffering from quite a lot of neglect, and rjbs (who performed its latest upload to the CPAN) told us on IRC he now uses a different solution that was written by someone else and has not been made public yet. I'd really like to see something better emerge, but I hope I won't have to fork Module::Starter under a different name.

I decided to stop patching it for the time being, but am getting anxious. It makes me frustrated to have an uncommitted patch and no repository access with which I can apply it.

As I was working on Module-Starter I talked with the SMOP guys, and decided to try give it a spin. After checking out the source and doing the make -f Makefile.cvs, ./configure, make dance, I ran into a few missing ".pm" files error. The first one was caused by the lack of the rest of the pugs tree, and the later ones were easily installable from CPAN. But then I ran into a strange error:

../../../misc/elfish/elfX/../../STD_red/STD_red_run:93: syntax error, unexpected '>'
    whiteout = ->(s){s.gsub(/[^ \n]/,' ')};

As it turned out, I needed Ruby-1.9.x (the development version that naturally is not avaialable in Mandriva or other Linux distributions), and decided that there's no way I'm installing it. This reminded me of Drivl.com recipe on how to make square corners, and I decided to give up on SMOP.

After all this, I also added a lot of text to the CMS/Web-devel-framework/Web-design Wikia, which I founded and had neglected previously, and to the pages in the Star Trek "Expanded Wikia" which I maintain, which were a nice change in scenery from all the code I wrote.

Today I didn't do too much productive work, after having my usual post-productivty disorientation, and instead spent the first half of the day chatting on IRC (to a very interesting American linguist-wannabe), but was also able to bike, for the first time since Saturday. Oh, and I saw Wall-E on Sunday, which I liked. Been a while since I've been to the cinema.